# Use an official Python runtime as a parent image
FROM registry.cn-shenzhen.aliyuncs.com/yh-python/base_image:latest

# Set the working directory to /app
WORKDIR /proxy_pool

# Copy the current directory contents into the container at /app
COPY . /proxy_pool
ADD . /server.properties
# Install any needed packages specified in requirements.txt
RUN pip install  -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo 'Asia/Shanghai' >/etc/timezone
# Make port 80 available to the world outside this container
EXPOSE 5000
# Define environment variable

# Run app.py when the container launches
CMD ["python", "main.py"]